// 引入插件
import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '@/views/Home'
import Journalism from '@/views/Journalism'
import Sports from '@/views/Sports'
import Gndty from '@/views/second/Gndty'
import Gwdty from '@/views/second/Gwdty'
import Tydzy from '@/views/second/Tydzy'
import About from  '@/views/About'
import Ul_Router from '@/views/Ul_Router'
import Contacts from '@/views/Contacts'
import Bob from '@/views/second/Bob'
import All_contacts from '@/views/second/All_contacts'
import Alice from  '@/views/second/Alice'
import Blog from '@/views/third/Blog'
import Fax from '@/views/third/Fax'
// 使用插件
Vue.use(VueRouter)

// 创建路由实例
const router = new VueRouter({
  routes: [
    {
      path: '/',
      component: Home,
    },
    {
      path: '/sports',
      component: Sports,
      children: [
        {
          path: '/',
          component: Tydzy
        },
        {
          path: 'gndty',
          component: Gndty
        },
        {
          path: 'gwdty',
          component: Gwdty
        }
      ]
    },
    {
      path: '/journalism',
      component: Journalism,
    },
    {
      path: '/about',
      component: About
    },
    {
      path: '/ul_router',
      component: Ul_Router
    },
    {
      path: '/contacts',
      component: Contacts,
      children: [
        {
          path: 'bob',
          component: Bob,
          children: [
            {
              path: 'blog',
              component: Blog
            },
            {
              path: 'fax',
              component: Fax
            }
          ]
        },
        {
          path: 'all_contacts',
          component: All_contacts
        },
        {
          path: 'alice',
          component: Alice
        }
      ]
    }
  ],
})

// 对外暴露
export default router
